Optimal. Leaf size=47 \[ \frac {b p x}{2 a}+\frac {1}{2} x^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right )-\frac {b^2 p \log (b+a x)}{2 a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {2505, 199, 45}
\begin {gather*} -\frac {b^2 p \log (a x+b)}{2 a^2}+\frac {1}{2} x^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right )+\frac {b p x}{2 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 199
Rule 2505
Rubi steps
\begin {align*} \int x \log \left (c \left (a+\frac {b}{x}\right )^p\right ) \, dx &=\frac {1}{2} x^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right )+\frac {1}{2} (b p) \int \frac {1}{a+\frac {b}{x}} \, dx\\ &=\frac {1}{2} x^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right )+\frac {1}{2} (b p) \int \frac {x}{b+a x} \, dx\\ &=\frac {1}{2} x^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right )+\frac {1}{2} (b p) \int \left (\frac {1}{a}-\frac {b}{a (b+a x)}\right ) \, dx\\ &=\frac {b p x}{2 a}+\frac {1}{2} x^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right )-\frac {b^2 p \log (b+a x)}{2 a^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 40, normalized size = 0.85 \begin {gather*} \frac {1}{2} \left (x^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right )+\frac {b p (a x-b \log (b+a x))}{a^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.05, size = 0, normalized size = 0.00 \[\int x \ln \left (c \left (a +\frac {b}{x}\right )^{p}\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 40, normalized size = 0.85 \begin {gather*} \frac {1}{2} \, b p {\left (\frac {x}{a} - \frac {b \log \left (a x + b\right )}{a^{2}}\right )} + \frac {1}{2} \, x^{2} \log \left ({\left (a + \frac {b}{x}\right )}^{p} c\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 50, normalized size = 1.06 \begin {gather*} \frac {a^{2} p x^{2} \log \left (\frac {a x + b}{x}\right ) + a^{2} x^{2} \log \left (c\right ) + a b p x - b^{2} p \log \left (a x + b\right )}{2 \, a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.48, size = 60, normalized size = 1.28 \begin {gather*} \begin {cases} \frac {x^{2} \log {\left (c \left (a + \frac {b}{x}\right )^{p} \right )}}{2} + \frac {b p x}{2 a} - \frac {b^{2} p \log {\left (a x + b \right )}}{2 a^{2}} & \text {for}\: a \neq 0 \\\frac {p x^{2}}{4} + \frac {x^{2} \log {\left (c \left (\frac {b}{x}\right )^{p} \right )}}{2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 152 vs.
\(2 (41) = 82\).
time = 4.14, size = 152, normalized size = 3.23 \begin {gather*} \frac {\frac {b^{3} p \log \left (\frac {a x + b}{x}\right )}{a^{2} - \frac {2 \, {\left (a x + b\right )} a}{x} + \frac {{\left (a x + b\right )}^{2}}{x^{2}}} + \frac {b^{3} p \log \left (-a + \frac {a x + b}{x}\right )}{a^{2}} - \frac {b^{3} p \log \left (\frac {a x + b}{x}\right )}{a^{2}} - \frac {a b^{3} p - a b^{3} \log \left (c\right ) - \frac {{\left (a x + b\right )} b^{3} p}{x}}{a^{3} - \frac {2 \, {\left (a x + b\right )} a^{2}}{x} + \frac {{\left (a x + b\right )}^{2} a}{x^{2}}}}{2 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.25, size = 41, normalized size = 0.87 \begin {gather*} \frac {x^2\,\ln \left (c\,{\left (a+\frac {b}{x}\right )}^p\right )}{2}+\frac {b\,p\,x}{2\,a}-\frac {b^2\,p\,\ln \left (b+a\,x\right )}{2\,a^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________